<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>ArangoDB PHP client API » \ArangoDBClient\EdgeDefinition</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">ArangoDB PHP client API</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Packages</a></li>
<li><a href="../packages/ArangoDBClient.html"><i class="icon-folder-open"></i> ArangoDBClient</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">25</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">15</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<div xmlns:php="http://php.net/xsl" class="btn-toolbar">
<div class="btn-group visibility" data-toggle="buttons-checkbox">
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
</div>
<div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
</div>
<ul xmlns:php="http://php.net/xsl" class="side-nav nav nav-list">
<li class="nav-header">
<i title="Methods" class="icon-custom icon-method"></i> Methods
                    <ul>
<li class="method public "><a href="#method___construct" title="__construct() :: Constructs an new edge definition"><span class="description">Constructs an new edge definition</span><pre>__construct()</pre></a></li>
<li class="method public "><a href="#method_addFromCollection" title="addFromCollection() :: Add a 'from' collections of the graph."><span class="description">Add a 'from' collections of the graph.</span><pre>addFromCollection()</pre></a></li>
<li class="method public "><a href="#method_addToCollection" title="addToCollection() :: Add a 'to' collections of the graph."><span class="description">Add a 'to' collections of the graph.</span><pre>addToCollection()</pre></a></li>
<li class="method public "><a href="#method_clearFromCollection" title="clearFromCollection() :: Resets the 'from' collections of the graph."><span class="description">Resets the 'from' collections of the graph.</span><pre>clearFromCollection()</pre></a></li>
<li class="method public "><a href="#method_clearToCollection" title="clearToCollection() :: Resets the 'to' collections of the graph."><span class="description">Resets the 'to' collections of the graph.</span><pre>clearToCollection()</pre></a></li>
<li class="method public "><a href="#method_createDirectedRelation" title="createDirectedRelation() :: Constructs a directed relation. This relation is an edge definition where the edges can start only in the
vertices defined in 'fromCollections' and end in vertices defined in 'toCollections'."><span class="description">Constructs a directed relation. This relation is an edge definition where the edges can start only in the
vertices defined in 'fromCollections' and end in vertices defined in 'toCollections'.</span><pre>createDirectedRelation()</pre></a></li>
<li class="method public "><a href="#method_createUndirectedRelation" title="createUndirectedRelation() :: Constructs an undirected relation. This relation is an edge definition where the edges can start and end
in any vertex from the collection list."><span class="description">Constructs an undirected relation. This relation is an edge definition where the edges can start and end
in any vertex from the collection list.</span><pre>createUndirectedRelation()</pre></a></li>
<li class="method public "><a href="#method_getFromCollections" title="getFromCollections() :: Get the 'from' collections of the graph."><span class="description">Get the 'from' collections of the graph.</span><pre>getFromCollections()</pre></a></li>
<li class="method public "><a href="#method_getRelation" title="getRelation() :: Get the relation of the edge definition."><span class="description">Get the relation of the edge definition.</span><pre>getRelation()</pre></a></li>
<li class="method public "><a href="#method_getToCollections" title="getToCollections() :: Get the 'to' collections of the graph."><span class="description">Get the 'to' collections of the graph.</span><pre>getToCollections()</pre></a></li>
<li class="method public "><a href="#method_setRelation" title="setRelation() :: Set the relation of the edge definition"><span class="description">Set the relation of the edge definition</span><pre>setRelation()</pre></a></li>
<li class="method public "><a href="#method_transformToArray" title="transformToArray() :: Transforms an edge definition to an array."><span class="description">Transforms an edge definition to an array.</span><pre>transformToArray()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i title="Properties" class="icon-custom icon-property"></i> Properties
                    <ul></ul>
</li>
<li class="nav-header protected">» Protected
                    <ul>
<li class="property protected "><a href="#property__fromCollections" title="$_fromCollections() :: An array containing the names of the vertices collections holding the start vertices."><span class="description"></span><pre>$_fromCollections</pre></a></li>
<li class="property protected "><a href="#property__relation" title="$_relation() :: The name of the edge collection for this relation."><span class="description"></span><pre>$_relation</pre></a></li>
<li class="property protected "><a href="#property__toCollections" title="$_toCollections() :: An array containing the names of the vertices collections holding the end vertices."><span class="description"></span><pre>$_toCollections</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a xmlns:php="http://php.net/xsl" id="\ArangoDBClient\EdgeDefinition"></a><ul xmlns:php="http://php.net/xsl" class="breadcrumb">
<li>
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/ArangoDBClient.html">ArangoDBClient</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/ArangoDBClient.EdgeDefinition.html">EdgeDefinition</a>
</li>
</ul>
<div xmlns:php="http://php.net/xsl" class="element class">
<p class="short_description">Value object representing an edge Definition.</p>
<div class="details">
<div class="long_description"><p>An edge definition contains a collection called 'relation' to store the edges and
multiple vertices collection defined in 'fromCollections' and 'toCollections'.</p>
<p><br></p></div>
<table class="table table-bordered">
<tr>
<th>package</th>
<td><a href="../packages/ArangoDBClient.html">ArangoDBClient</a></td>
</tr>
<tr>
<th>since</th>
<td>2.2</td>
</tr>
</table>
<h3>
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
<a id="method___construct"></a><div class="element clickable method public method___construct " data-toggle="collapse" data-target=".method___construct .collapse" title="public">
<h2>Constructs an new edge definition</h2>
<pre>__construct(string $relation<code> = null</code>, array|string $fromCollections<code> = array()</code>, array|string $toCollections<code> = array()</code>) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$relation</h4>
<code>string</code><ul>
<li>name of the relation (the underlying edge collection).</li>
</ul></div>
<div class="subelement argument">
<h4>$fromCollections</h4>
<code>array</code><code>string</code><ul>
<li>a list of collections providing the edges start vertices or a string holding a single collection name.</li>
</ul></div>
<div class="subelement argument">
<h4>$toCollections</h4>
<code>array</code><code>string</code><ul>
<li>a list of collections providing the edges end vertices or a string holding a single collection name.</li>
</ul></div>
</div></div>
</div>
<a id="method_addFromCollection"></a><div class="element clickable method public method_addFromCollection " data-toggle="collapse" data-target=".method_addFromCollection .collapse" title="public">
<h2>Add a 'from' collections of the graph.</h2>
<pre>addFromCollection(string $fromCollection) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$fromCollection</h4>
<code>string</code><ul>
<li>the name of the added collection.</li>
</ul></div>
</div></div>
</div>
<a id="method_addToCollection"></a><div class="element clickable method public method_addToCollection " data-toggle="collapse" data-target=".method_addToCollection .collapse" title="public">
<h2>Add a 'to' collections of the graph.</h2>
<pre>addToCollection(string $toCollection) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$toCollection</h4>
<code>string</code><ul>
<li>the name of the added collection.</li>
</ul></div>
</div></div>
</div>
<a id="method_clearFromCollection"></a><div class="element clickable method public method_clearFromCollection " data-toggle="collapse" data-target=".method_clearFromCollection .collapse" title="public">
<h2>Resets the 'from' collections of the graph.</h2>
<pre>clearFromCollection() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
</div></div>
</div>
<a id="method_clearToCollection"></a><div class="element clickable method public method_clearToCollection " data-toggle="collapse" data-target=".method_clearToCollection .collapse" title="public">
<h2>Resets the 'to' collections of the graph.</h2>
<pre>clearToCollection() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
</div></div>
</div>
<a id="method_createDirectedRelation"></a><div class="element clickable method public method_createDirectedRelation " data-toggle="collapse" data-target=".method_createDirectedRelation .collapse" title="public">
<h2>Constructs a directed relation. This relation is an edge definition where the edges can start only in the
vertices defined in 'fromCollections' and end in vertices defined in 'toCollections'.</h2>
<pre>createDirectedRelation(string $relation, array|string $fromCollections, array|string $toCollections) : \ArangoDBClient\EdgeDefinition</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$relation</h4>
<code>string</code><ul>
<li>name of the relation (the underlying edge collection).</li>
</ul></div>
<div class="subelement argument">
<h4>$fromCollections</h4>
<code>array</code><code>string</code><ul>
<li>a list of collections providing the edges start vertices or a string holding a single collection name.</li>
</ul></div>
<div class="subelement argument">
<h4>$toCollections</h4>
<code>array</code><code>string</code><ul>
<li>a list of collections providing the edges end vertices or a string holding a single collection name.</li>
</ul></div>
<h3>Returns</h3>
<div class="subelement response"><code>\ArangoDBClient\EdgeDefinition</code></div>
</div></div>
</div>
<a id="method_createUndirectedRelation"></a><div class="element clickable method public method_createUndirectedRelation " data-toggle="collapse" data-target=".method_createUndirectedRelation .collapse" title="public">
<h2>Constructs an undirected relation. This relation is an edge definition where the edges can start and end
in any vertex from the collection list.</h2>
<pre>createUndirectedRelation(string $relation, array $vertexCollections) : \ArangoDBClient\EdgeDefinition</pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$relation</h4>
<code>string</code><ul>
<li>name of the relation (the underlying edge collection).</li>
</ul></div>
<div class="subelement argument">
<h4>$vertexCollections</h4>
<code>array</code><ul>
<li>a list of collections providing the edges start and end vertices.</li>
</ul></div>
<h3>Returns</h3>
<div class="subelement response"><code>\ArangoDBClient\EdgeDefinition</code></div>
</div></div>
</div>
<a id="method_getFromCollections"></a><div class="element clickable method public method_getFromCollections " data-toggle="collapse" data-target=".method_getFromCollections .collapse" title="public">
<h2>Get the 'from' collections of the graph.</h2>
<pre>getFromCollections() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>array</code></div>
</div></div>
</div>
<a id="method_getRelation"></a><div class="element clickable method public method_getRelation " data-toggle="collapse" data-target=".method_getRelation .collapse" title="public">
<h2>Get the relation of the edge definition.</h2>
<pre>getRelation() : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_getToCollections"></a><div class="element clickable method public method_getToCollections " data-toggle="collapse" data-target=".method_getToCollections .collapse" title="public">
<h2>Get the 'to' collections of the graph.</h2>
<pre>getToCollections() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>array</code></div>
</div></div>
</div>
<a id="method_setRelation"></a><div class="element clickable method public method_setRelation " data-toggle="collapse" data-target=".method_setRelation .collapse" title="public">
<h2>Set the relation of the edge definition</h2>
<pre>setRelation(string $relation) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$relation</h4>
<code>string</code><ul>
<li>the name of the relation.</li>
</ul></div>
</div></div>
</div>
<a id="method_transformToArray"></a><div class="element clickable method public method_transformToArray " data-toggle="collapse" data-target=".method_transformToArray .collapse" title="public">
<h2>Transforms an edge definition to an array.</h2>
<pre>transformToArray() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>2.2</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code>array</code></div>
</div></div>
</div>
<h3>
<i title="Properties" class="icon-custom icon-property"></i> Properties</h3>
<a id="property__fromCollections"> </a><div class="element clickable property protected property__fromCollections" data-toggle="collapse" data-target=".property__fromCollections .collapse" title="protected">
<h2>An array containing the names of the vertices collections holding the start vertices.</h2>
<pre>$_fromCollections : array</pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>array()</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property__relation"> </a><div class="element clickable property protected property__relation" data-toggle="collapse" data-target=".property__relation .collapse" title="protected">
<h2>The name of the edge collection for this relation.</h2>
<pre>$_relation : string</pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property__toCollections"> </a><div class="element clickable property protected property__toCollections" data-toggle="collapse" data-target=".property__toCollections .collapse" title="protected">
<h2>An array containing the names of the vertices collections holding the end vertices.</h2>
<pre>$_toCollections : array</pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>array()</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
            generated on 2019-08-19T13:30:49+02:00.<br></footer></div>
</div>
</body>
</html>
